3.5.60 \(\int (g+h x)^2 \sqrt {a+b \log (c (d (e+f x)^p)^q)} \, dx\) [460]

3.5.60.1 Optimal result
3.5.60.2 Mathematica [A] (verified)
3.5.60.3 Rubi [A] (verified)
3.5.60.4 Maple [F]
3.5.60.5 Fricas [F(-2)]
3.5.60.6 Sympy [F]
3.5.60.7 Maxima [F]
3.5.60.8 Giac [F]
3.5.60.9 Mupad [F(-1)]

3.5.60.1 Optimal result

Integrand size = 30, antiderivative size = 488 \[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=-\frac {\sqrt {b} e^{-\frac {a}{b p q}} (f g-e h)^2 \sqrt {p} \sqrt {\pi } \sqrt {q} (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{2 f^3}-\frac {\sqrt {b} e^{-\frac {2 a}{b p q}} h (f g-e h) \sqrt {p} \sqrt {\frac {\pi }{2}} \sqrt {q} (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{2 f^3}-\frac {\sqrt {b} e^{-\frac {3 a}{b p q}} h^2 \sqrt {p} \sqrt {\frac {\pi }{3}} \sqrt {q} (e+f x)^3 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{6 f^3}+\frac {(f g-e h)^2 (e+f x) \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^3}+\frac {h (f g-e h) (e+f x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^3}+\frac {h^2 (e+f x)^3 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{3 f^3} \]

output
-1/18*h^2*(f*x+e)^3*erfi(3^(1/2)*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/b^(1/2) 
/p^(1/2)/q^(1/2))*b^(1/2)*p^(1/2)*3^(1/2)*Pi^(1/2)*q^(1/2)/exp(3*a/b/p/q)/ 
f^3/((c*(d*(f*x+e)^p)^q)^(3/p/q))-1/4*h*(-e*h+f*g)*(f*x+e)^2*erfi(2^(1/2)* 
(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/b^(1/2)/p^(1/2)/q^(1/2))*b^(1/2)*p^(1/2) 
*2^(1/2)*Pi^(1/2)*q^(1/2)/exp(2*a/b/p/q)/f^3/((c*(d*(f*x+e)^p)^q)^(2/p/q)) 
-1/2*(-e*h+f*g)^2*(f*x+e)*erfi((a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/b^(1/2)/p 
^(1/2)/q^(1/2))*b^(1/2)*p^(1/2)*Pi^(1/2)*q^(1/2)/exp(a/b/p/q)/f^3/((c*(d*( 
f*x+e)^p)^q)^(1/p/q))+(-e*h+f*g)^2*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/ 
2)/f^3+h*(-e*h+f*g)*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/f^3+1/3*h^ 
2*(f*x+e)^3*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2)/f^3
 
3.5.60.2 Mathematica [A] (verified)

Time = 0.49 (sec) , antiderivative size = 458, normalized size of antiderivative = 0.94 \[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=\frac {(e+f x) \left (-18 \sqrt {b} e^{-\frac {a}{b p q}} (f g-e h)^2 \sqrt {p} \sqrt {\pi } \sqrt {q} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )+9 \sqrt {b} e^{-\frac {2 a}{b p q}} h (-f g+e h) \sqrt {p} \sqrt {2 \pi } \sqrt {q} (e+f x) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )-2 \sqrt {b} e^{-\frac {3 a}{b p q}} h^2 \sqrt {p} \sqrt {3 \pi } \sqrt {q} (e+f x)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )+36 (f g-e h)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}+36 h (f g-e h) (e+f x) \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}+12 h^2 (e+f x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}\right )}{36 f^3} \]

input
Integrate[(g + h*x)^2*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]],x]
 
output
((e + f*x)*((-18*Sqrt[b]*(f*g - e*h)^2*Sqrt[p]*Sqrt[Pi]*Sqrt[q]*Erfi[Sqrt[ 
a + b*Log[c*(d*(e + f*x)^p)^q]]/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/(E^(a/(b*p*q)) 
*(c*(d*(e + f*x)^p)^q)^(1/(p*q))) + (9*Sqrt[b]*h*(-(f*g) + e*h)*Sqrt[p]*Sq 
rt[2*Pi]*Sqrt[q]*(e + f*x)*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^ 
q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/(E^((2*a)/(b*p*q))*(c*(d*(e + f*x)^p)^q)^ 
(2/(p*q))) - (2*Sqrt[b]*h^2*Sqrt[p]*Sqrt[3*Pi]*Sqrt[q]*(e + f*x)^2*Erfi[(S 
qrt[3]*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/( 
E^((3*a)/(b*p*q))*(c*(d*(e + f*x)^p)^q)^(3/(p*q))) + 36*(f*g - e*h)^2*Sqrt 
[a + b*Log[c*(d*(e + f*x)^p)^q]] + 36*h*(f*g - e*h)*(e + f*x)*Sqrt[a + b*L 
og[c*(d*(e + f*x)^p)^q]] + 12*h^2*(e + f*x)^2*Sqrt[a + b*Log[c*(d*(e + f*x 
)^p)^q]]))/(36*f^3)
 
3.5.60.3 Rubi [A] (verified)

Time = 2.03 (sec) , antiderivative size = 488, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2895, 2848, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}dx\)

\(\Big \downarrow \) 2848

\(\displaystyle \int \left (\frac {(f g-e h)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^2}+\frac {2 h (e+f x) (f g-e h) \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^2}+\frac {h^2 (e+f x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {\sqrt {\frac {\pi }{2}} \sqrt {b} h \sqrt {p} \sqrt {q} (e+f x)^2 e^{-\frac {2 a}{b p q}} (f g-e h) \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {2}{p q}} \text {erfi}\left (\frac {\sqrt {2} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{2 f^3}-\frac {\sqrt {\pi } \sqrt {b} \sqrt {p} \sqrt {q} (e+f x) e^{-\frac {a}{b p q}} (f g-e h)^2 \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {1}{p q}} \text {erfi}\left (\frac {\sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{2 f^3}-\frac {\sqrt {\frac {\pi }{3}} \sqrt {b} h^2 \sqrt {p} \sqrt {q} (e+f x)^3 e^{-\frac {3 a}{b p q}} \left (c \left (d (e+f x)^p\right )^q\right )^{-\frac {3}{p q}} \text {erfi}\left (\frac {\sqrt {3} \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{\sqrt {b} \sqrt {p} \sqrt {q}}\right )}{6 f^3}+\frac {h (e+f x)^2 (f g-e h) \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^3}+\frac {(e+f x) (f g-e h)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{f^3}+\frac {h^2 (e+f x)^3 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}}{3 f^3}\)

input
Int[(g + h*x)^2*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]],x]
 
output
-1/2*(Sqrt[b]*(f*g - e*h)^2*Sqrt[p]*Sqrt[Pi]*Sqrt[q]*(e + f*x)*Erfi[Sqrt[a 
 + b*Log[c*(d*(e + f*x)^p)^q]]/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/(E^(a/(b*p*q))* 
f^3*(c*(d*(e + f*x)^p)^q)^(1/(p*q))) - (Sqrt[b]*h*(f*g - e*h)*Sqrt[p]*Sqrt 
[Pi/2]*Sqrt[q]*(e + f*x)^2*Erfi[(Sqrt[2]*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^ 
q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q])])/(2*E^((2*a)/(b*p*q))*f^3*(c*(d*(e + f*x)^ 
p)^q)^(2/(p*q))) - (Sqrt[b]*h^2*Sqrt[p]*Sqrt[Pi/3]*Sqrt[q]*(e + f*x)^3*Erf 
i[(Sqrt[3]*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]])/(Sqrt[b]*Sqrt[p]*Sqrt[q]) 
])/(6*E^((3*a)/(b*p*q))*f^3*(c*(d*(e + f*x)^p)^q)^(3/(p*q))) + ((f*g - e*h 
)^2*(e + f*x)*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]])/f^3 + (h*(f*g - e*h)*( 
e + f*x)^2*Sqrt[a + b*Log[c*(d*(e + f*x)^p)^q]])/f^3 + (h^2*(e + f*x)^3*Sq 
rt[a + b*Log[c*(d*(e + f*x)^p)^q]])/(3*f^3)
 

3.5.60.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2848
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q*(a + b*Log[c*(d 
 + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*f - 
 d*g, 0] && IGtQ[q, 0]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.5.60.4 Maple [F]

\[\int \left (h x +g \right )^{2} \sqrt {a +b \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right )}d x\]

input
int((h*x+g)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2),x)
 
output
int((h*x+g)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^(1/2),x)
 
3.5.60.5 Fricas [F(-2)]

Exception generated. \[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=\text {Exception raised: TypeError} \]

input
integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x, algorithm="frica 
s")
 
output
Exception raised: TypeError >>  Error detected within library code:   inte 
grate: implementation incomplete (constant residues)
 
3.5.60.6 Sympy [F]

\[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=\int \sqrt {a + b \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}} \left (g + h x\right )^{2}\, dx \]

input
integrate((h*x+g)**2*(a+b*ln(c*(d*(f*x+e)**p)**q))**(1/2),x)
 
output
Integral(sqrt(a + b*log(c*(d*(e + f*x)**p)**q))*(g + h*x)**2, x)
 
3.5.60.7 Maxima [F]

\[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=\int { {\left (h x + g\right )}^{2} \sqrt {b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a} \,d x } \]

input
integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x, algorithm="maxim 
a")
 
output
integrate((h*x + g)^2*sqrt(b*log(((f*x + e)^p*d)^q*c) + a), x)
 
3.5.60.8 Giac [F]

\[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=\int { {\left (h x + g\right )}^{2} \sqrt {b \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a} \,d x } \]

input
integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^(1/2),x, algorithm="giac" 
)
 
output
integrate((h*x + g)^2*sqrt(b*log(((f*x + e)^p*d)^q*c) + a), x)
 
3.5.60.9 Mupad [F(-1)]

Timed out. \[ \int (g+h x)^2 \sqrt {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )} \, dx=\int {\left (g+h\,x\right )}^2\,\sqrt {a+b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )} \,d x \]

input
int((g + h*x)^2*(a + b*log(c*(d*(e + f*x)^p)^q))^(1/2),x)
 
output
int((g + h*x)^2*(a + b*log(c*(d*(e + f*x)^p)^q))^(1/2), x)